<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport"  content="width=device-width,height=device-height initial-scale=1">
		<link rel="stylesheet" href="src/css/basic.css" type="text/css" />
		<link  type="text/css" href="src/jquery/jquery.mobile-1.0b3.min.css" rel="stylesheet" />
		
		<script type="text/javascript" src="src/jquery/jquery-1.6.2.min.js"></script>
		<script type="text/javascript" src="src/jquery/jquery.mobile-1.0b3.min.js"></script> 
		<script type="text/javascript" src="src/scripts/json_sans_eval.min.js"></script>
		<script type="text/javascript" src="src/scripts/basic.min.js"></script>
		<script type="text/javascript" src="src/scripts/caller.min.js"></script>  
	</head>
	<body>
	 	<!--1.-LOGIN  -->
		<div id="login" data-role="page" >
		 	<div data-role="header" data-theme="b">
		        <h1></h1>
				<a href="#view" data-icon="home" data-transition="slide"></a>
					<!--<a  rel="external" href="../index.html"  data-role="button" data-icon="arrow-r"  data-transition="slide">Inicio</a> -->
				<div class="css_head"></div>
		    </div>
			
			<div data-role="content" data-theme="d">
			     <div data-role="fieldcontain" data-theme="e">
				    <label for="txtValue1">Usuario</label>
				    <input type="text" name="txtValue1" id="txtValue1" value="" />
				</div>	
				<div data-role="fieldcontain" data-theme="e">
				    <label for="txtValue2">Clave</label>
				    <input type="password" name="txtValue2" id="txtValue2" value="" />
				</div>	
				<div id="results">
				</div>
				<p></p>
				<a id="btnLogin" name="btnLogin" data-role="button" data-theme="b">Ingresar</a>
		  	</div>
			<div data-role="footer" data-theme="c"> 
			    <div class="css_footer"></div>
	  		</div>
		</div>
		<!--1.1.-LOGIN-ERROR  -->
	    <div id="popup" data-role="page">
			<div data-role="header" data-theme="b">
		        <h1>Mensaje</h1>
		        <a id="btnMsgLogin"   href="#login" data-icon="arrow-l"  data-transition="slide"></a>
		    </div>
			<div data-role="content" data-theme="b">
				<center>
					<h3>Usuario/clave incorrecto</h3>	
				</center>
			</div>
			<div data-role="footer" data-theme="c"> 
			    <div class="css_footer"></div>
	  		</div>
	    </div>
	 	<!--0.-CREDITOS  -->	
		<div id="view" data-role="page" data-theme="c">
		
		 	<div data-role="header" data-theme="b">
		        <h1></h1>
				<a href="#login" data-icon="arrow-l"  data-transition="slide"></a>
			 	<div class="css_head"></div>
		    </div>
			
			<div data-role="content" data-theme="d">
		    	<div class="css_logo"></div>
				<a href="#login"  data-role="button" data-icon="arrow-r"  data-transition="slide" data-theme="b">Inicio</a>
	
			</div>
	
  		<div data-role="footer" data-theme="c"> 
			 <h3> © 2011</h3>
	  	</div>
	   </div>
	<!--  -->
	<!-- Include Library --> 
	<script type="text/javascript">
		var myPage=new Object();myPage={callbackFunctionLogin:function(l){try{var k=false;var g=typeof l;var h="";if(g=="string"){var i=jsonParse(l);g=typeof i;if(g=="object"){if(i.Status=="1"){k=true;h="index"+i.CRol+".html";mySession.setRol(i.CRol)}}myCaller.callbackNotLoadingImg();if(k==true&&h!=""){switch(i.CRol){case"ADM":case"RAF":location.replace(h);break;default:location.replace("indexNULL.html");break}}else{$("#txtValue1").val("");$("#txtValue2").val("");alert("Usuario/clave incorrecto")}}}catch(j){alert("Error callbackFunctionLogin: "+j.message)}},myLogin:function(){try{var c=$.trim($("#txtValue1").val());var h=$.trim($("#txtValue2").val());var f="sUser="+c+"&sPass="+h+"";myCaller.srcResource="src/";if(c!=""&&h!=""){myCaller.doCallService("GetLogin",f,"results","myPage.callbackFunctionLogin")}else{alert("Usuario/clave incorrecto")}}catch(g){alert("Error myLogin: "+g.message)}}};function clickExit(){try{$.mobile.changePage($("#login"),"slide")}catch(b){alert("Error clickExit: "+b.message)}}$("#txtValue2").live("keypress",function(a){if(a.keyCode==13){myPage.myLogin();return false}});$("#login").live("pageshow",function(){try{$("#txtValue1").val("");$("#txtValue2").val("")}catch(b){alert("Error [id=login] pageshow: "+b.message)}});$("#btnLogin").live("click",function(){try{myPage.myLogin()}catch(a){alert("Error [id=login] pageshow: "+a.message)}});
	</script> 
	</body>
</html>
